|
|
|
|
|
|
|
Prior to a report being printed, some information should be gathered from the user concerning how he or she wants to print the report. You can have the user choose those options from the Print dialog box. You can set flags to control which options display on this dialog box. The most common properties the user will select are the printer, the print range (start page and end page), and the number of copies. Figure 11.8 shows a typical Print dialog box. |
|
|
|
|
|
|
|
|
Figure 11.8
The Print dialog box. |
|
|
|
|
|
|
|
|
This dialog box is generated by the following code: |
|
|
|
 |
|
|
|
|
Private Sub cmdPrinter_Click()
' Reset any flags
cdlCommon.Flags = 0
' Display the Printer Dialog Box
cdlCommon.ShowPrinter
End Sub |
|
|
|
|
|
|
|
|
Its a good idea to reset the Flags property to 0this will clear any other values that may have been left over from any previous method calls using the same common dialog. The ShowPrinter method displays the Print dialog box. |
|
|
|
|
|
|
|
|
Flags for the Print Dialog Box |
|
|
|
|
|
|
|
|
You can set quite a few flags that control the look and feel of the Print dialog box. Table 11.6 lists some of the more common ones. |
|
|
|
|
|